import { request } from './request';

export async function getAllLaboratory() {
  return request('/api/laboratory', {
    method: 'GET',
  })
}

export async function appendLaboratory(data: any) {
  return request('/api/laboratory', {
    method: 'POST',
    data,
  })
}

export async function updateLaboratory(data: any) {
  return request(`/api/laboratory/${data?.lId}`, {
    method: 'PUT',
    data,
  })
}

export async function destroyLaboratory(data: any) {
  return request(`/api/laboratory/${data?.lId}`, {
    method: 'DELETE',
  })
}

export default {
  getAllLaboratory,
  appendLaboratory,
  updateLaboratory,
  destroyLaboratory,
};
